package edu.ynu.se.xiecheng.achitectureclass.entity;

import edu.ynu.se.xiecheng.achitectureclass.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.util.Date;

@Data
@Entity
@Table(name = "tokens", indexes = {
    @Index(name = "idx_token_type", columnList = "tokenType", unique = true)
})
public class Token extends BaseEntity {
    
    @Column(length = 32)
    private String tokenType;  // CAMERA 或 FBOX
    
    @Column(columnDefinition = "TEXT")
    private String accessToken;
    
    @Column(columnDefinition = "TIMESTAMP")
    private Date expireTime;
} 